package sk.naive.talker.command;

import java.rmi.*;

public class Quit extends AbstractCommand {
	public static final String UPROP_QUIT_MESSAGE = "quit.message";

	public void exec()
		throws RemoteException
	{
		try {
			user.send(getString("quit.seeYou", user.getProperties()));
			if (params == null || params.length() == 0) {
				params = null;
			}
			user.set(UPROP_QUIT_MESSAGE, params);
		} catch (Exception e) {
			// just ignore it - only following userOut is really mandatory
		}
		getTalker().userOut(user);
	}
}
